package com.yxym.modifier;
public class A {
    public int n1 = 100;
    protected int n2 = 200;
    int n3 = 300;
    private int n4 = 400;//私有属性
    public void m1(){
        //同一类中可以访问public，private，protected，默认修饰的类和属性,
        System.out.println("n1 = "+ n1  + "n2 = " + n2 + " n3 = "
                + n3 + " n4 = " + n4);
    }
    protected void m2(){
    }
    private void m4(){
    }
    void m3(){}
    public void hi(){
        //同一类中可以访问public，private，protected，默认修饰的类和属性
        m2();
        m1();
        m3();
        m4();
    }
}
